/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.yy.bugzillahelp.data;

import java.util.ArrayList;

/**
 *
 * @author hualun-alan
 */
public class BugDetailData {

    private String bugId;
    private int id;
    private String createTime;
    private String modifyTime;
    private String shortDesc;
    private String product;
    private String component;
    private String version;
    private String status;
    private String resolution;
    private String priority;
    private String severity;
    private String reporter;
    private String assignedTo;
    private ArrayList<BugCommentData> descDatas = new ArrayList<BugCommentData>();

    //<editor-fold defaultstate="collapsed" desc="getter/setter">
    public String getBugId() {
        return bugId;
    }

    public void setBugId(String bugId) {
        this.bugId = bugId;
        this.id = Integer.parseInt(bugId);
    }

    public int getId() {
        return id;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(String modifyTime) {
        this.modifyTime = modifyTime;
    }

    public String getShortDesc() {
        return shortDesc;
    }

    public void setShortDesc(String shortDesc) {
        this.shortDesc = shortDesc;
    }

    public String getProduct() {
        return product;
    }

    public void setProduct(String product) {
        this.product = product;
    }

    public String getComponent() {
        return component;
    }

    public void setComponent(String component) {
        this.component = component;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String bug_status) {
        this.status = bug_status;
    }

    public String getResolution() {
        return resolution;
    }

    public void setResolution(String resolution) {
        this.resolution = resolution;
    }

    public String getPriority() {
        return priority;
    }

    public void setPriority(String priority) {
        this.priority = priority;
    }

    public String getSeverity() {
        return severity;
    }

    public void setSeverity(String severity) {
        this.severity = severity;
    }

    public String getReporter() {
        return reporter;
    }

    public void setReporter(String reporter) {
        this.reporter = reporter;
    }

    public String getAssignedTo() {
        return assignedTo;
    }

    public void setAssignedTo(String assigned_to) {
        this.assignedTo = assigned_to;
    }

    public ArrayList<BugCommentData> getDescDatas() {
        return descDatas;
    }

    public void setDescDatas(ArrayList<BugCommentData> descDatas) {
        this.descDatas = descDatas;
    }

    public void addDescData(BugCommentData data) {
        this.descDatas.add(data);
    }
    //</editor-fold>

    @Override
    public String toString() {
        String result = super.toString()
                + "\n[bug id=" + getBugId() + "],[create time=" + getCreateTime() + "],[modify time=" + getModifyTime() + "],"
                + "[shortDesc=" + getShortDesc() + "],[product=" + getProduct() + "],[component=" + getComponent() + "],"
                + "[version=" + getVersion() + "],[bug_status=" + getStatus() + "],[resolution=" + getResolution() + "],"
                + "[priority=" + getPriority() + "],[severity=" + getSeverity() + "],[reporter=" + getReporter() + "],"
                + "[desc data size=" + getDescDatas().size() + "]";
        for (BugCommentData longDescData : descDatas) {
            result += "\n" + longDescData.toString();
        }

        return result;
    }
}
